﻿#include <iostream>
using namespace std;
int main()
{
	int n,m,a,num;
	cin >> n>>m>>a;
	if (n % a != 0)n += a;
	if (m % a != 0)m += a;
	num = (n / a) * (m / a);
	cout << num;
}